package thread;

public class ThreadDemo8 {
    public static void main(String[] args) {
        Thread thread = new Thread(()->{
            while (true) {
                System.out.println("hello");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
    });
        thread.start();
        //第二次调用start就会出现问题
        thread.start();

    }



}
